package com.algorighm.hqy;

/**
 * @Classname TreeTest
 * @Date 2019/9/19 17:00
 * @auther by hqy
 */
public class TreeTest {

    public static void main(String[] args) {
        DataNode dataNode = new DataNode(0);
        dataNode.setLeft(new DataNode(1));
        dataNode.setRight(new DataNode(2));
        dataNode.getLeft().setLeft(new DataNode(4));
        dataNode.getLeft().setRight(new DataNode(5));
        dataNode.getRight().setLeft(new DataNode(6));
        dataNode.getRight().setRight(new DataNode(7));
        dataNode.getLeft().getLeft().setLeft(new DataNode(8));
        dataNode.getLeft().getLeft().setRight(new DataNode(9));

        BinaryTree binaryTree = new BinaryTree();
        binaryTree.setRoot(dataNode);

        System.out.println(binaryTree.preOrder(11));
      /*  binaryTree.preOrder();
        System.out.println("前序遍历完成");
        binaryTree.infixOrder();
        System.out.println("中序遍历完成");
        binaryTree.postOrder();*/


    }
}
